﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;

/// <summary>
///db_aboutUs 的摘要说明
/// </summary>
public class db_aboutUs
{
    SqlDBClass db;
	public db_aboutUs()
	{
		//
		//TODO: 在此处添加构造函数逻辑
		//
        db = new SqlDBClass();
	}

    public DataSet selectAboutUs()
    {
        string strsql = "select * from aboutus where id=1";
        return db.execSql(strsql);
    }

    public Boolean updateAboutUs(string into)
    {
        string strsql = "";
        if (selectAboutUs().Tables[0].Rows.Count == 0)
        {
            strsql = "insert into aboutus (info) values ('" + into + "')";
        }
        else
        {
            strsql = "update aboutus set info='" + into + "' where id=1";
        }
        return db.execSqlNoQuery(strsql);
    } 
}